﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TCG.Engine.Effects;
using TCG.Engine.Core;
using TCG.Engine.Libraries;
using TCG.Engine.Impacts;

namespace TCG.Engine.Tests.HumanDeck
{
    [Effect("Knight")]
    public class KnightEffect: OvertimeEffect
    {
        public KnightEffect(): base(0)
        {

        }
        public override void Apply(MoveContext mc)
        {
            mc.ActivePlayer.Effects.Add(this);
        }

        public override void Move(MoveContext mc)
        {
            var impacts = mc.Impacts.Where(i => i.Type == ImpactTypeInfo.DealDamage && i.Classes.Contains(HumanConsts.Classes.HumanTrooper));
            foreach (SimpleImpact i in impacts)
            {
                i.Value += 1;
            }
        }
    }
}
